#ifndef LOGINWIDGET_H
#define LOGINWIDGET_H

/*该类为登录窗口类，GUI*/

#include <QWidget>
#include <QMouseEvent>
#include "UserLayer/External/pagemanger.h"
QT_BEGIN_NAMESPACE
namespace Ui { class LoginWidget; }
QT_END_NAMESPACE

class LoginWidget : public QWidget
{
    Q_OBJECT

public:
    LoginWidget(QWidget *parent = nullptr);
    ~LoginWidget();

private slots:
    void on_btn_close_clicked();

    void on_btn_min_clicked();

    void on_btn_login_clicked();


    void on_checkBox_remember_stateChanged(int arg1);

    void on_checkBox_autologin_stateChanged(int arg1);

    void doSettings();

    void jumpWidget();

    void on_btn_signup_clicked();

    void creatNewUserFile(const QString& username);

    void logPass();

    void logError();

    void logBan();

private:

    Ui::LoginWidget *ui;
    QString useroc;
    QString username;
    bool m_bDrag;
    QPoint mouseStartPoint;
    QPoint windowTopLeftPoint;
    bool isfirst;
private:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
};
#endif // LOGINWIDGET_H
